xen: Do not accept DOMID_SELF as input to DOMCTL_getdomaininfo.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 14 Aug 2007 08:56:46 +0000 (09:56 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 14 Aug 2007 08:56:46 +0000 (09:56 +0100)
commit10ef7a91b5a8cb8c58903c60e2dd16ed490b3bcf
treeb45f083ea04f84fe3c389fabefc2f6c959e2aaf4
parent807d8048a2e07509b79ebc20826f6ba115f6de2c
xen: Do not accept DOMID_SELF as input to DOMCTL_getdomaininfo.
This was screwing up callers that loop on getdomaininfo(), if there
was a domain with domid DOMID_FIRST_RESERVED-1 (== DOMID_SELF-1).
They would see DOMID_SELF-1, then look up DOMID_SELF, which has domid
0 of course, and then start their domain-finding loop all over again!
Found by Kouya Shimura <kouya@jp.fujitsu.com>. Thanks!
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/common/domctl.c